<?php

class fSourceViewer extends aFeature {

   public function __construct() {
      $this->_acl = new AccessControlList();
      $this->_acl->setGranted(7); 
   }

   public static function getTocEntry() {
      return "Explorateur de Source";
   }

   public static function getRealName() {
		return "Affichage du Code Source";
	}
	
	public static function getSemantic() {
		$res  = "Cette fonctionalité permet implémente un explorateur du noyau Balloon";
		return $res;
	}


  protected function run() {
		$page = "<h1>Affichage du Noyau PHP Balloon</h1>";
		$page .= "<div style=\"float:left; width=20%; margin: 0px 20px 0px 0px\">";
		$page .= "<h2> Contenu </h2>";
		$page .= SourceCode::listKernelFiles();
		$page .= "</div>";
		
		$page .= "<div style='float:left'> &nbsp;&nbsp; </div>";
		
		$param = array();
		$param[0] = "./ClassLoader.php";
		
		$page .= "<div id=\"sourceCode\" style=\"float:left; width=auto\">";
		chdir(BALLOON_FS_PATH."kernel/");
		$page .= SourceCode::bajax_display($param);
		$page .= "</div>";
		return $page;

  }

	


}

?>